<style>
    h2 a{margin-right: 15px;color: darkcyan;text-decoration: none}
    h2 a:hover{color: crimson;text-decoration: underline}
    h2 a:last-child{margin-right: 0}
    .current{color: #f8ab0a}
    .loginInfo{text-align: right;font-size: 14px;font-weight: normal;color: #5c874b;display: block;margin-left: 20px}
    .title1{display: block}
    .title2{display: block}
    .logout{color: brown}
    a{text-decoration: none;color: #f9a525
    }
    a:hover{text-decoration: underline}
    .nav{margin-bottom: 35px;}
</style>
<?php
if($_SESSION['loggedUsername']){
?><h2 class="loginInfo">当前登录者：<?php echo $_SESSION['loggedUsername'];?> <a href="logout.php" class="logout">注销登录</a></h2>
<h1 class="title1">会员注册管理系统</h1>

    <?php
    }
else{
    ?>
    <h1 class="title2">会员注册管理系统</h1>
<?php
}
    $navID = $_GET['navID'] ??  0;
    if(!is_numeric($navID)){
        echo "<script>alert('参数错误');location.href='index.php';</script>";
        exit;
    }
    ?>
<h2 class="nav">
    <a href="index.php?navID=0" <?php if($navID == 0){echo 'class="current"';} ?>>首页</a>
    <a href="register.php?navID=1" <?php if($navID == 1){echo 'class="current"';} ?>>会员注册</a>
    <a href="login.php?navID=2" <?php if($navID == 2){echo 'class="current"';} ?>>会员登录</a>
    <a href="modify.php?navID=3" <?php if($navID == 3){echo 'class="current"';} ?>>个人资料修改</a>
    <a href="admin.php?navID=4" <?php if($navID == 4){echo 'class="current"';} ?>>后台管理</a>
</h2>
